Skip to content

Revert "[FE-Feat] 논의 id 난수화"#432

Merged
dioo1461 merged 1 commit intodevfrom
revert-365-feature/fe/encode-discussion-id
Jul 27, 2025
Merged

Revert "[FE-Feat] 논의 id 난수화"#432
dioo1461 merged 1 commit intodevfrom
revert-365-feature/fe/encode-discussion-id

Conversation

@dioo1461
Copy link
Contributor

@dioo1461 dioo1461 commented Jul 27, 2025

Reverts #365

Summary by CodeRabbit

  • Bug Fixes

    • Corrected the handling and type of discussion IDs across the application, changing them from strings to numbers for improved consistency and reliability.
    • Fixed API response parsing for discussion confirmation.
  • Chores

    • Removed unused dependencies and internal utilities related to environment variables and encryption from the server.
    • Updated build and test configurations for improved maintainability.
  • Tests

    • Added a new Vitest configuration for server-side testing.
  • Refactor

    • Simplified server middleware by removing custom discussion ID encryption and proxy logic.

@dioo1461 dioo1461 self-assigned this Jul 27, 2025
@dioo1461 dioo1461 requested a review from hamo-o as a code owner July 27, 2025 13:06
@coderabbitai
Copy link

coderabbitai bot commented Jul 27, 2025

Walkthrough

This change refactors the handling of discussion IDs throughout the frontend and server codebase, converting their type from string to number in all relevant interfaces, schemas, and components. It also removes server-side middleware and utilities for encrypting, decrypting, and proxying discussion IDs, along with related environment configuration and dependencies.

Changes

File(s) Change Summary
frontend/.gitignore Removed .env from ignore list.
frontend/package.json Removed dotenv from devDependencies.
frontend/apps/server/package.json Removed http-proxy-middleware dependency; added @endolphin/vitest-config to devDependencies.
frontend/apps/server/tsup.config.ts Disabled bundling and removed explicit externals.
frontend/apps/server/vitest.config.ts Added new Vitest configuration file.
frontend/apps/server/src/envconfig.ts Deleted file for loading and exporting environment variables.
frontend/apps/server/src/utils/isProduction.ts Deleted file exporting isProduction constant.
frontend/apps/server/src/utils/cipher.ts Deleted AES-GCM encryption/decryption utility.
frontend/apps/server/src/utils/stringTransformer.ts Deleted Base64 URL-safe encoding/decoding utility.
frontend/apps/server/src/utils/object.ts Deleted generic object value manipulation utility.
frontend/apps/server/src/utils/collectResponse.ts Deleted utility for collecting streamed response data.
frontend/apps/server/src/middlewares/discussionId/discussionCipher.ts Deleted discussion ID encryption/decryption utilities.
frontend/apps/server/src/middlewares/discussionId/proxyHandlers.ts Deleted proxy handlers for discussion ID transformation in requests/responses.
frontend/apps/server/src/middlewares/discussionId/index.ts Deleted discussion ID transformer and verifier middleware.
frontend/apps/server/src/index.ts Removed imports and middleware related to discussion ID transformation/verification; inlined isProduction check.
frontend/apps/client/src/utils/error/HTTPError.ts Removed isNotFoundError method from HTTPError class.
frontend/apps/client/src/utils/error/handleError.ts Removed redirection on "Not Found" error in error handler.
frontend/apps/client/src/features/discussion/api/index.ts Fixed response parsing in candidateApi methods.
frontend/apps/client/src/features/discussion/api/invitationApi.ts Changed discussionId parameter type from string to number in API methods.
frontend/apps/client/src/features/discussion/api/keys.ts Changed discussionId parameter type from string to number in query key function.
frontend/apps/client/src/features/discussion/api/mutations.ts Changed discussionId property type from string to number in mutation body.
frontend/apps/client/src/features/discussion/api/queries.ts Changed discussionId parameter type from string to number in query hook.
frontend/apps/client/src/features/discussion/api/queryOptions.ts Changed discussionId parameter type from string to number in query option function.
frontend/apps/client/src/features/discussion/model/index.ts Changed id and discussionId fields from string to number in schemas; exported DiscussionConfirmResponse.
frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/SubmitForm.tsx Changed discussionId prop type from string to number.
frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/index.tsx Changed discussionId prop type from string to number in component interfaces.
frontend/apps/client/src/features/shared-schedule/model/finishedSchedules.ts Changed discussionId field from string to number in finished schedule schema.
frontend/apps/client/src/features/shared-schedule/model/ongoingSchedules.ts Changed discussionId field from string to number in ongoing schedule schema.
frontend/apps/client/src/features/shared-schedule/model/upcomingSchedules.ts Changed discussionId field from string to number in upcoming schedule schema.
frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/RecommendedSchedules.tsx Changed discussionId prop type from string to number in component.
frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/ScheduleDetails.tsx Changed discussionId prop type from string to number; converted to string for downstream usage.
frontend/apps/client/src/features/timeline-schedule/model/index.ts Changed discussionId field from string to number in candidate detail response schema.
frontend/apps/client/src/pages/DiscussionPage/DiscussionInvitePage/index.tsx Coerced id parameter to number before passing as discussionId prop.
frontend/apps/client/src/pages/MyCalendarPage/DiscussionContext.ts Changed selectedId and setSelectedId types from string | null to number | null in context interface.
frontend/apps/client/src/pages/MyCalendarPage/index.tsx Changed selectedId state type from string | null to number | null.
frontend/apps/client/src/routes/_main/discussion/invite/$id.tsx Coerced id parameter to number before passing to query option in loader.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Frontend
    participant API

    User->>Frontend: Initiate discussion-related action (with discussionId as number)
    Frontend->>API: Send request with discussionId (number)
    API-->>Frontend: Responds with discussionId (number)
    Frontend-->>User: Renders UI with numeric discussionId
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Possibly related PRs

Suggested labels

🖥️ FE

Poem

A hop and a skip, numbers replace the string,
Discussion IDs now dance as digits in spring.
Old ciphered secrets, we bid you goodbye,
Middleware burrows vanish, as rabbits leap high.
Code now runs lighter, with types crisp and clear—
A numeric new dawn, for all to revere! 🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-365-feature/fe/encode-discussion-id

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dioo1461 dioo1461 merged commit a3da2be into dev Jul 27, 2025
5 of 6 checks passed
@dioo1461 dioo1461 deleted the revert-365-feature/fe/encode-discussion-id branch July 27, 2025 13:09
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
frontend/apps/server/src/index.ts (1)

74-74: 빈 줄 정리를 고려해보세요.

미들웨어 제거 후 남은 빈 줄을 정리하면 코드가 더 깔끔해질 것 같습니다.

   await addMiddleware();
   await serveHTML();
-
   if (!isProduction) {
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32557d7 and 3aad8e0.

⛔ Files ignored due to path filters (1)
  • frontend/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (36)
  • frontend/.gitignore (0 hunks)
  • frontend/apps/client/src/features/discussion/api/index.ts (2 hunks)
  • frontend/apps/client/src/features/discussion/api/invitationApi.ts (1 hunks)
  • frontend/apps/client/src/features/discussion/api/keys.ts (1 hunks)
  • frontend/apps/client/src/features/discussion/api/mutations.ts (1 hunks)
  • frontend/apps/client/src/features/discussion/api/queries.ts (1 hunks)
  • frontend/apps/client/src/features/discussion/api/queryOptions.ts (1 hunks)
  • frontend/apps/client/src/features/discussion/model/index.ts (2 hunks)
  • frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/SubmitForm.tsx (1 hunks)
  • frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/index.tsx (2 hunks)
  • frontend/apps/client/src/features/shared-schedule/model/finishedSchedules.ts (1 hunks)
  • frontend/apps/client/src/features/shared-schedule/model/ongoingSchedules.ts (1 hunks)
  • frontend/apps/client/src/features/shared-schedule/model/upcomingSchedules.ts (1 hunks)
  • frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/RecommendedSchedules.tsx (1 hunks)
  • frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/ScheduleDetails.tsx (1 hunks)
  • frontend/apps/client/src/features/timeline-schedule/model/index.ts (1 hunks)
  • frontend/apps/client/src/pages/DiscussionPage/DiscussionInvitePage/index.tsx (1 hunks)
  • frontend/apps/client/src/pages/MyCalendarPage/DiscussionContext.ts (1 hunks)
  • frontend/apps/client/src/pages/MyCalendarPage/index.tsx (1 hunks)
  • frontend/apps/client/src/routes/_main/discussion/invite/$id.tsx (1 hunks)
  • frontend/apps/client/src/utils/error/HTTPError.ts (0 hunks)
  • frontend/apps/client/src/utils/error/handleError.ts (1 hunks)
  • frontend/apps/server/package.json (1 hunks)
  • frontend/apps/server/src/envconfig.ts (0 hunks)
  • frontend/apps/server/src/index.ts (2 hunks)
  • frontend/apps/server/src/middlewares/discussionId/discussionCipher.ts (0 hunks)
  • frontend/apps/server/src/middlewares/discussionId/index.ts (0 hunks)
  • frontend/apps/server/src/middlewares/discussionId/proxyHandlers.ts (0 hunks)
  • frontend/apps/server/src/utils/cipher.ts (0 hunks)
  • frontend/apps/server/src/utils/collectResponse.ts (0 hunks)
  • frontend/apps/server/src/utils/isProduction.ts (0 hunks)
  • frontend/apps/server/src/utils/object.ts (0 hunks)
  • frontend/apps/server/src/utils/stringTransformer.ts (0 hunks)
  • frontend/apps/server/tsup.config.ts (1 hunks)
  • frontend/apps/server/vitest.config.ts (1 hunks)
  • frontend/package.json (0 hunks)
💤 Files with no reviewable changes (12)
  • frontend/.gitignore
  • frontend/package.json
  • frontend/apps/client/src/utils/error/HTTPError.ts
  • frontend/apps/server/src/utils/isProduction.ts
  • frontend/apps/server/src/envconfig.ts
  • frontend/apps/server/src/utils/collectResponse.ts
  • frontend/apps/server/src/utils/stringTransformer.ts
  • frontend/apps/server/src/middlewares/discussionId/proxyHandlers.ts
  • frontend/apps/server/src/middlewares/discussionId/discussionCipher.ts
  • frontend/apps/server/src/utils/cipher.ts
  • frontend/apps/server/src/utils/object.ts
  • frontend/apps/server/src/middlewares/discussionId/index.ts
🧰 Additional context used
🧠 Learnings (16)
📓 Common learnings
Learnt from: dioo1461
PR: softeer5th/Team4-enDolphin#53
File: frontend/src/components/Input/MultiInput.tsx:50-59
Timestamp: 2025-02-04T03:10:35.809Z
Learning: User dioo1461 prefers to receive code reviews and responses in Korean language.
Learnt from: dioo1461
PR: softeer5th/Team4-enDolphin#365
File: frontend/server/middlewares/discussionIdTransformer/discussionCipher.js:24-30
Timestamp: 2025-03-28T06:06:04.683Z
Learning: The decryptDiscussionId function can benefit from additional error handling despite the existing error handling in the aesGcm module, since aesGcm rethrows errors rather than handling them with fallbacks. Error handling for the URL processing-related functions improves application resilience.
frontend/apps/server/package.json (2)

Learnt from: hamo-o
PR: #411
File: frontend/apps/client/package.json:7-7
Timestamp: 2025-05-27T17:33:56.448Z
Learning: In the Team4-enDolphin project, the server uses Vite as middleware in development mode, so the dev script in frontend/apps/client/package.json only needs to start the server (pnpm --filter server start) rather than running separate Vite dev server and server processes.

Learnt from: dioo1461
PR: #426
File: frontend/packages/ui/vite.config.ts:6-0
Timestamp: 2025-06-13T07:39:57.840Z
Learning: frontend/packages/ui/vite.config.ts 에서 defineConfigvitest/config 로부터 가져오는 것은 정상적인 패턴이다. vitest/config 는 Vite의 defineConfig 를 re-export 하며, test 옵션 타입을 추가로 제공한다.

frontend/apps/client/src/features/shared-schedule/model/finishedSchedules.ts (1)

Learnt from: dioo1461
PR: #222
File: frontend/src/features/discussion/model/index.ts:14-18
Timestamp: 2025-02-19T09:40:49.594Z
Learning: In the discussion feature's SharedEventDTO, use z.string().datetime() for validating date-time strings as it properly handles ISO 8601 format.

frontend/apps/client/src/features/shared-schedule/model/ongoingSchedules.ts (1)

Learnt from: dioo1461
PR: #222
File: frontend/src/features/discussion/model/index.ts:14-18
Timestamp: 2025-02-19T09:40:49.594Z
Learning: In the discussion feature's SharedEventDTO, use z.string().datetime() for validating date-time strings as it properly handles ISO 8601 format.

frontend/apps/server/tsup.config.ts (3)

Learnt from: dioo1461
PR: #426
File: frontend/packages/ui/vite.config.ts:6-0
Timestamp: 2025-06-13T07:39:57.840Z
Learning: frontend/packages/ui/vite.config.ts 에서 defineConfigvitest/config 로부터 가져오는 것은 정상적인 패턴이다. vitest/config 는 Vite의 defineConfig 를 re-export 하며, test 옵션 타입을 추가로 제공한다.

Learnt from: hamo-o
PR: #411
File: frontend/apps/client/package.json:7-7
Timestamp: 2025-05-27T17:33:56.448Z
Learning: In the Team4-enDolphin project, the server uses Vite as middleware in development mode, so the dev script in frontend/apps/client/package.json only needs to start the server (pnpm --filter server start) rather than running separate Vite dev server and server processes.

Learnt from: hamo-o
PR: #89
File: frontend/src/routes/__root.tsx:18-20
Timestamp: 2025-02-04T09:08:12.489Z
Learning: In the Team4-enDolphin project, environment-specific features should be lazy-loaded and conditionally imported based on defaultENV.MODE to optimize bundle size and enable tree-shaking in production builds.

frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/RecommendedSchedules.tsx (2)

Learnt from: hamo-o
PR: #205
File: frontend/src/features/discussion/ui/DiscussionCalendar/CalendarTable.tsx:29-33
Timestamp: 2025-02-19T05:54:56.987Z
Learning: The hardcoded selectedUserIdList in CalendarTable.tsx will be replaced with dynamic user selection when checkbox functionality is implemented in a future PR.

Learnt from: hamo-o
PR: #101
File: frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx:10-35
Timestamp: 2025-02-06T05:14:12.328Z
Learning: Form state management and validation for the SchedulePopover component in frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx will be implemented in a future PR.

frontend/apps/client/src/features/shared-schedule/model/upcomingSchedules.ts (1)

Learnt from: dioo1461
PR: #222
File: frontend/src/features/discussion/model/index.ts:14-18
Timestamp: 2025-02-19T09:40:49.594Z
Learning: In the discussion feature's SharedEventDTO, use z.string().datetime() for validating date-time strings as it properly handles ISO 8601 format.

frontend/apps/client/src/pages/MyCalendarPage/DiscussionContext.ts (1)

Learnt from: hamo-o
PR: #205
File: frontend/src/features/discussion/ui/DiscussionCalendar/CalendarTable.tsx:29-33
Timestamp: 2025-02-19T05:54:56.987Z
Learning: The hardcoded selectedUserIdList in CalendarTable.tsx will be replaced with dynamic user selection when checkbox functionality is implemented in a future PR.

frontend/apps/client/src/features/discussion/model/index.ts (2)

Learnt from: dioo1461
PR: #222
File: frontend/src/features/discussion/model/index.ts:14-18
Timestamp: 2025-02-19T09:40:49.594Z
Learning: In the discussion feature's SharedEventDTO, use z.string().datetime() for validating date-time strings as it properly handles ISO 8601 format.

Learnt from: dioo1461
PR: #222
File: frontend/src/features/discussion/model/index.ts:14-18
Timestamp: 2025-02-19T09:40:49.594Z
Learning: In the discussion feature, use:

  • z.string().datetime() when the field needs to validate full ISO 8601 datetime strings (e.g., in SharedEventDTO)
  • DATE_BAR regex when only date component (YYYY-MM-DD) needs to be validated
frontend/apps/client/src/utils/error/handleError.ts (3)

Learnt from: hamo-o
PR: #348
File: frontend/src/main.tsx:16-19
Timestamp: 2025-03-23T22:04:21.003Z
Learning: In the Team4-enDolphin project, throwOnError: handleError in Tanstack Query configuration is intentional. The handleError function contains branching logic that returns true for NetworkError to propagate it, and false for other errors to handle them internally without rethrowing.

Learnt from: hamo-o
PR: #348
File: frontend/src/main.tsx:16-19
Timestamp: 2025-03-23T22:04:21.003Z
Learning: In the Team4-enDolphin project, throwOnError: handleError in Tanstack Query configuration is intentional. The handleError function contains branching logic that returns true for NetworkError to propagate it, and false for other errors to handle them internally without rethrowing.

Learnt from: dioo1461
PR: #365
File: frontend/server/middlewares/discussionIdTransformer/discussionCipher.js:24-30
Timestamp: 2025-03-28T06:06:04.683Z
Learning: The decryptDiscussionId function can benefit from additional error handling despite the existing error handling in the aesGcm module, since aesGcm rethrows errors rather than handling them with fallbacks. Error handling for the URL processing-related functions improves application resilience.

frontend/apps/server/src/index.ts (3)

Learnt from: hamo-o
PR: #411
File: frontend/apps/client/package.json:7-7
Timestamp: 2025-05-27T17:33:56.448Z
Learning: In the Team4-enDolphin project, the server uses Vite as middleware in development mode, so the dev script in frontend/apps/client/package.json only needs to start the server (pnpm --filter server start) rather than running separate Vite dev server and server processes.

Learnt from: dioo1461
PR: #365
File: frontend/server/middlewares/discussionIdTransformer/discussionCipher.js:24-30
Timestamp: 2025-03-28T06:06:04.683Z
Learning: The decryptDiscussionId function can benefit from additional error handling despite the existing error handling in the aesGcm module, since aesGcm rethrows errors rather than handling them with fallbacks. Error handling for the URL processing-related functions improves application resilience.

Learnt from: dioo1461
PR: #426
File: frontend/packages/ui/vite.config.ts:6-0
Timestamp: 2025-06-13T07:39:57.840Z
Learning: frontend/packages/ui/vite.config.ts 에서 defineConfigvitest/config 로부터 가져오는 것은 정상적인 패턴이다. vitest/config 는 Vite의 defineConfig 를 re-export 하며, test 옵션 타입을 추가로 제공한다.

frontend/apps/client/src/pages/MyCalendarPage/index.tsx (4)

Learnt from: hamo-o
PR: #205
File: frontend/src/features/discussion/ui/DiscussionCalendar/CalendarTable.tsx:29-33
Timestamp: 2025-02-19T05:54:56.987Z
Learning: The hardcoded selectedUserIdList in CalendarTable.tsx will be replaced with dynamic user selection when checkbox functionality is implemented in a future PR.

Learnt from: hamo-o
PR: #95
File: frontend/src/components/Calendar/Core/WeekCell.tsx:34-34
Timestamp: 2025-02-06T01:44:08.551Z
Learning: In the Calendar WeekCell component, Date.now() is intentionally used as a key when selected is true to force re-renders of the component when the selected state changes. This is a specific requirement for the component's animation behavior.

Learnt from: hamo-o
PR: #101
File: frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx:10-35
Timestamp: 2025-02-06T05:14:12.328Z
Learning: Form state management and validation for the SchedulePopover component in frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx will be implemented in a future PR.

Learnt from: hamo-o
PR: #80
File: frontend/src/components/Calendar/Header/CalendarHeader.tsx:8-24
Timestamp: 2025-02-04T03:20:42.270Z
Learning: The codebase uses useSafeContext hook to handle React context error cases by throwing an error with message "🚨 이 컴포넌트는 ContextProvider 내부에서 사용되어야 합니다!" when the context value is null.

frontend/apps/server/vitest.config.ts (2)

Learnt from: dioo1461
PR: #426
File: frontend/packages/ui/vite.config.ts:6-0
Timestamp: 2025-06-13T07:39:57.840Z
Learning: frontend/packages/ui/vite.config.ts 에서 defineConfigvitest/config 로부터 가져오는 것은 정상적인 패턴이다. vitest/config 는 Vite의 defineConfig 를 re-export 하며, test 옵션 타입을 추가로 제공한다.

Learnt from: hamo-o
PR: #411
File: frontend/apps/client/package.json:7-7
Timestamp: 2025-05-27T17:33:56.448Z
Learning: In the Team4-enDolphin project, the server uses Vite as middleware in development mode, so the dev script in frontend/apps/client/package.json only needs to start the server (pnpm --filter server start) rather than running separate Vite dev server and server processes.

frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/SubmitForm.tsx (4)

Learnt from: hamo-o
PR: #267
File: frontend/src/features/discussion/ui/DiscussionForm/MeetingPassword.tsx:16-20
Timestamp: 2025-02-21T17:55:36.208Z
Learning: In the DiscussionForm component, the password field is optional and not required for form submission.

Learnt from: hamo-o
PR: #169
File: frontend/src/features/my-calendar/ui/SchedulePopover/PopoverForm.tsx:73-73
Timestamp: 2025-02-14T11:43:43.567Z
Learning: In the SchedulePopover's PopoverForm component, the time input fields are readOnly and their values are controlled by the parent component through valuesRef, so validation for time range is not needed.

Learnt from: hamo-o
PR: #101
File: frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx:10-35
Timestamp: 2025-02-06T05:14:12.328Z
Learning: Form state management and validation for the SchedulePopover component in frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx will be implemented in a future PR.

Learnt from: hamo-o
PR: #96
File: frontend/src/components/DatePicker/Header/index.tsx:22-27
Timestamp: 2025-02-06T02:45:15.500Z
Learning: Date picker navigation controls (e.g., previous/next month buttons) should include proper accessibility attributes:

  • role="button" for semantic meaning
  • tabIndex={0} for keyboard focus
  • aria-label for screen reader description
  • onKeyDown handler for keyboard interaction (Enter key)
frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/ScheduleDetails.tsx (2)

Learnt from: hamo-o
PR: #205
File: frontend/src/features/discussion/ui/DiscussionCalendar/CalendarTable.tsx:29-33
Timestamp: 2025-02-19T05:54:56.987Z
Learning: The hardcoded selectedUserIdList in CalendarTable.tsx will be replaced with dynamic user selection when checkbox functionality is implemented in a future PR.

Learnt from: hamo-o
PR: #101
File: frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx:10-35
Timestamp: 2025-02-06T05:14:12.328Z
Learning: Form state management and validation for the SchedulePopover component in frontend/src/routes/my-schedule/@components/SchedulePopover/PopoverForm.tsx will be implemented in a future PR.

frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/index.tsx (1)

Learnt from: hamo-o
PR: #267
File: frontend/src/features/discussion/ui/DiscussionForm/MeetingPassword.tsx:16-20
Timestamp: 2025-02-21T17:55:36.208Z
Learning: In the DiscussionForm component, the password field is optional and not required for form submission.

🧬 Code Graph Analysis (3)
frontend/apps/client/src/routes/_main/discussion/invite/$id.tsx (1)
frontend/apps/client/src/features/discussion/api/queryOptions.ts (1)
  • invitationQueryOption (8-11)
frontend/apps/client/src/features/discussion/api/index.ts (1)
frontend/apps/client/src/features/discussion/model/index.ts (2)
  • DiscussionConfirmResponse (80-90)
  • DiscussionConfirmResponse (96-96)
frontend/apps/server/vitest.config.ts (1)
frontend/configs/vitest-config/src/node.ts (1)
  • nodeConfig (3-9)
🔇 Additional comments (32)
frontend/apps/client/src/utils/error/handleError.ts (1)

25-25: 변경 확인: 404 에러 처리 로직 완전 제거됨

스크립트 실행 결과,

  • frontend/apps/client/src/utils/error/HTTPError.ts 내에 isNotFoundError 메소드가 존재하지 않고
  • 전체 코드베이스(frontend/)에 isNotFoundError 참조가 없으며
  • not-found 관련 라우팅 설정도 더 이상 사용되지 않음을 확인했습니다.

따라서 해당 리팩토링은 HTTPError 클래스 변경 사항과 일치하며, 추가 정리 작업 없이 안전하게 머지할 수 있습니다.

frontend/apps/server/package.json (1)

12-12: 의존성 정리가 올바르게 수행되었습니다.

http-proxy-middleware 제거는 논의 ID 암호화 미들웨어 제거와 일치하며, @endolphin/vitest-config 추가는 테스트 인프라 개선을 위한 좋은 변경사항입니다.

Also applies to: 17-18

frontend/apps/server/tsup.config.ts (1)

11-11: Verify bundle: false build & deploy compatibility

Disabling bundling in tsup.config.ts means your output will be a set of ESM files rather than a single bundled artifact. Please confirm the following before merging:

  • Dependencies (e.g. express) are always installed in your deployment environment so that runtime imports resolve correctly.
  • The generated dist/ folder contains all necessary .js modules and that node dist/index.js still works (check your "type": "module" setting or file extensions).
  • Your CI/CD or Docker pipeline packages both dist/ and node_modules (or otherwise provisions dependencies) to avoid runtime errors.

If you intentionally switched off bundling for faster iteration or clearer stack traces, document these deployment changes; otherwise consider re-enabling bundling for a self-contained server build.

frontend/apps/server/vitest.config.ts (1)

1-14: 테스트 설정이 올바르게 구성되었습니다.

ES 모듈 환경에서 올바른 디렉터리 경로 처리 방식을 사용하고 있으며, 워크스페이스의 기본 설정과 프로젝트별 설정을 적절히 병합하고 있습니다. vitest/config의 defineProject 사용도 표준 패턴을 따르고 있습니다.

frontend/apps/server/src/index.ts (1)

10-10: 인라인 환경 체크로 단순화가 잘 되었습니다.

isProduction 유틸리티를 인라인으로 정의하여 불필요한 import를 제거한 것은 좋은 단순화입니다.

frontend/apps/client/src/pages/DiscussionPage/DiscussionInvitePage/index.tsx (1)

25-25: 토론 ID 타입 변환이 올바르게 구현되었습니다.

문자열 라우트 매개변수를 숫자로 변환하는 단항 플러스 연산자 사용이 적절합니다. 이는 DiscussionInviteCard 컴포넌트가 이제 숫자 타입의 discussionId를 기대하는 것과 일치합니다.

frontend/apps/client/src/features/shared-schedule/model/upcomingSchedules.ts (2)

9-9: 토론 ID 타입 변경이 올바르게 적용되었습니다.

discussionIdz.number()로 변경한 것이 리버트 목적에 부합합니다.


21-22: Align discussionId type between UpcomingSchedule schemas

The two schemas in upcomingSchedules.ts currently diverge on discussionId:

  • UpcomingScheduleSchema (line 9):
    discussionId: z.number(),
  • UpcomingScheduleDetailsResponseSchema (lines 21–22):
    // TODO: discussionId 인코딩 적용 후 z.string()으로 변경
    discussionId: z.union([z.string(), z.number()]),

If the API always returns a numeric ID, change the details schema to use z.number(). If the details endpoint may encode the ID as a string, either:

  • Update UpcomingScheduleSchema to match (union) and normalize downstream, or
  • Decode the string before parsing and keep both schemas as z.number().

Please confirm the backend contract and update both schemas accordingly.

frontend/apps/client/src/features/shared-schedule/model/ongoingSchedules.ts (1)

5-5: 토론 ID 타입 변경이 일관되게 적용되었습니다.

discussionIdz.number()로 변경한 것이 다른 스케줄 모델들과 일치하며 리버트 목적에 부합합니다.

frontend/apps/client/src/features/discussion/api/queries.ts (1)

111-112: Invitation Query Type Change Verified

All invitation-related modules consistently use number for discussionId, while other discussion features continue to use string. This aligns with the separate backend endpoints for invitation vs. encrypted-ID functionality. No code changes are required.

Relevant files (all consistently using number for invitation):

  • frontend/apps/client/src/features/discussion/api/queries.ts – useInviteInfoQuery(discussionId: number)
  • frontend/apps/client/src/features/discussion/api/queryOptions.ts – invitationQueryOption(discussionId: number)
  • frontend/apps/client/src/features/discussion/api/keys.ts – invitationQueryKey(discussionId: number)
  • frontend/apps/client/src/features/discussion/api/invitationApi.ts – getInvitationInfo(discussionId: number) & postInviatationJoin(discussionId: number)
  • frontend/apps/client/src/features/discussion/api/mutations.ts – mutation body: { discussionId: number }
  • frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/** – props using number

Other discussion queries (e.g., useDiscussionQuery, discussionCalendarQuery, etc.) correctly remain on string for encrypted IDs.

frontend/apps/client/src/features/shared-schedule/model/finishedSchedules.ts (1)

6-6: 토론 ID 타입 변경이 일관되게 적용되었습니다.

discussionIdz.number()로 변경한 것이 다른 스케줄 모델들과 일치하며 리버트가 올바르게 구현되었습니다.

frontend/apps/client/src/features/timeline-schedule/model/index.ts (1)

34-34: discussionId schema update is safe and requires no further changes

The change of discussionId to z.number() in CandidateDetailResponseSchema applies only to the parsed response. We’ve scanned all usages of CandidateDetailResponse and found:

  • No UI or downstream code consuming response.discussionId expects it to be a string.
  • All request/query functions still take discussionId as a string input (route params), which is orthogonal to the response schema.
  • Invitation APIs already handle discussionId as a number, matching the updated schema.

No code paths were found that misuse the parsed discussionId as a string, so this schema change is safe as-is.

frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/SubmitForm.tsx (1)

14-14: Props 타입 변경이 올바르게 적용되었습니다.

SubmitFormPropsdiscussionId 타입을 number로 변경한 것이 적절합니다. 컴포넌트 내부에서 navigation 시 .toString()을 사용하여 string으로 변환하는 부분(34번째 줄)도 올바르게 처리되어 있습니다.

frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/RecommendedSchedules.tsx (1)

58-58: 컴포넌트 Props 타입 변경이 올바르게 구현되었습니다.

RecommendedScheduleItemdiscussionId props 타입을 number로 변경한 것이 적절합니다. Link 컴포넌트의 params에서 .toString()을 사용하여 string으로 변환하는 부분(70번째 줄)도 올바르게 처리되어 있습니다.

frontend/apps/client/src/features/discussion/api/keys.ts (1)

27-27: Query Key 함수의 타입 변경이 올바르게 적용되었습니다.

invitationQueryKey 함수의 discussionId 매개변수 타입을 number로 변경한 것이 전체적인 타입 리팩토링과 일치합니다. React Query의 캐시 키는 number 타입을 올바르게 처리할 수 있으므로 문제없이 작동할 것입니다.

frontend/apps/client/src/features/discussion/api/queryOptions.ts (1)

8-8: Query Option 함수의 타입 변경이 일관성 있게 적용되었습니다.

invitationQueryOption 함수의 discussionId 매개변수 타입을 number로 변경한 것이 적절합니다. 이 변경사항은 invitationQueryKeyinvitationApi.getInvitationInfo 함수에서도 number 타입을 사용하는 것과 일치합니다.

frontend/apps/client/src/routes/_main/discussion/invite/$id.tsx (1)

22-22: 타입 변환이 올바르게 적용되었습니다.

라우트 파라미터 idNumber()로 변환하여 invitationQueryOption 함수에 전달하는 것이 적절합니다. 라우트 파라미터는 항상 문자열이지만 API가 이제 숫자 타입을 기대하므로 필요한 변환입니다.

frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/ScheduleDetails.tsx (3)

23-23: props 타입이 올바르게 업데이트되었습니다.

discussionId의 타입이 string에서 number로 변경되어 전체 코드베이스의 타입 일관성과 맞춰졌습니다.


55-55: 라우트 파라미터를 위한 타입 변환이 적절합니다.

Link 컴포넌트의 params는 문자열을 기대하므로 .toString() 변환이 올바릅니다.


28-28: 확인 완료: useDiscussionQuery 훅은 문자열 파라미터를 기대하므로 .toString() 사용이 올바릅니다.

현재 코드(frontend/apps/client/src/features/shared-schedule/ui/OngoingSchedules/ScheduleDetails.tsx)에서:

  • discussionIdnumber 타입이며
  • useDiscussionQuery(discussionId.toString())로 전달되어야 훅 시그니처(discussionId: string)와 일치합니다.

장기적으로는 discussionId 타입을 전역적으로 string으로 통일하거나, 훅이 number도 허용하도록 오버로드를 고려할 수 있습니다.

frontend/apps/client/src/pages/MyCalendarPage/index.tsx (1)

18-18: 상태 타입이 올바르게 업데이트되었습니다.

selectedId 상태의 타입을 number | null로 변경한 것이 전체 코드베이스의 discussionId 타입 일관성과 맞춰져 적절합니다.

frontend/apps/client/src/features/discussion/api/index.ts (3)

7-14: import 구문 정리가 적절합니다.

DiscussionConfirmResponse를 별도의 import 구문으로 분리한 것이 코드 가독성을 향상시킵니다.


67-67: 파싱 메서드 호출이 올바르게 수정되었습니다.

이전의 response.parse(response)는 잘못된 호출이었습니다. DiscussionConfirmResponse.parse(response)로 수정하여 Zod 스키마를 사용한 올바른 응답 파싱이 가능합니다.


72-72: 파싱 메서드 호출이 올바르게 수정되었습니다.

DiscussionConfirmResponse.parse(response)를 사용하여 API 응답을 올바르게 파싱하도록 수정되었습니다.

frontend/apps/client/src/features/discussion/api/mutations.ts (1)

33-33: mutation 파라미터 타입이 올바르게 업데이트되었습니다.

discussionId의 타입을 number로 변경한 것이 invitationApi.postInviatationJoin 함수의 예상 파라미터 타입과 일치하여 적절합니다.

frontend/apps/client/src/pages/MyCalendarPage/DiscussionContext.ts (1)

6-7: 타입 변경이 올바르게 적용되었습니다.

논의 ID를 문자열에서 숫자로 되돌리는 변경사항이 인터페이스에 정확히 반영되었습니다. nullable 타입도 적절히 유지되었습니다.

frontend/apps/client/src/features/discussion/api/invitationApi.ts (2)

6-6: API 메서드 매개변수 타입이 올바르게 변경되었습니다.

getInvitationInfo 메서드의 discussionId 매개변수가 number 타입으로 정확히 변경되었습니다.


11-11: API 메서드 매개변수 타입이 올바르게 변경되었습니다.

postInviatationJoin 메서드의 discussionId 매개변수가 number 타입으로 정확히 변경되었습니다. 템플릿 리터럴에서 숫자가 자동으로 문자열로 변환되므로 URL 구성에 문제가 없습니다.

frontend/apps/client/src/features/discussion/ui/DiscussionInviteCard/index.tsx (2)

15-15: 컴포넌트 props 타입이 올바르게 업데이트되었습니다.

DiscussionInviteCardProps 인터페이스의 discussionId 속성이 number 타입으로 정확히 변경되었습니다.


64-64: 푸터 컴포넌트 props 타입이 일관되게 업데이트되었습니다.

DiscussionInviteCardFooterProps 인터페이스의 discussionId 속성도 number 타입으로 일관되게 변경되어 타입 안전성이 유지됩니다.

frontend/apps/client/src/features/discussion/model/index.ts (2)

40-40: 응답 스키마의 ID 타입이 올바르게 변경되었습니다.

DiscussionResponse 스키마의 id 필드가 z.number()로 정확히 업데이트되어 숫자형 논의 ID 검증이 가능합니다.


80-81: 확인 응답 스키마가 적절히 업데이트되었습니다.

DiscussionConfirmResponse 스키마가 내보내기로 변경되어 재사용성이 향상되었고, discussionId 필드도 z.number()로 일관되게 변경되었습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants